using System.ComponentModel.DataAnnotations;

namespace Lzfy_Refund_Service.Models
{
    /// <summary>
    /// 等待HIS退费请求模型
    /// </summary>
    public class WaitForHisRefundRequest
    {
        /// <summary>
        /// 患者ID
        /// </summary>
        [Required(ErrorMessage = "患者ID不能为空")]
        [StringLength(32, ErrorMessage = "患者ID长度不能超过32个字符")]
        public string PatientId { get; set; } = string.Empty;

        /// <summary>
        /// 新退费密码
        /// </summary>
        [Required(ErrorMessage = "退费密码不能为空")]
        [StringLength(32, ErrorMessage = "退费密码长度不能超过32个字符")]
        public string RefundPassword { get; set; } = string.Empty;

        /// <summary>
        /// 修改人
        /// </summary>
        [Required(ErrorMessage = "修改人不能为空")]
        [StringLength(50, ErrorMessage = "修改人长度不能超过50个字符")]
        public string Modifier { get; set; } = string.Empty;

        /// <summary>
        /// 修改人证件类型
        /// </summary>
        [StringLength(10, ErrorMessage = "修改人证件类型长度不能超过10个字符")]
        public string? ModifierCardType { get; set; }

        /// <summary>
        /// 修改人证件号码
        /// </summary>
        [StringLength(32, ErrorMessage = "修改人证件号码长度不能超过32个字符")]
        public string? ModifierCardCode { get; set; }

        /// <summary>
        /// 原密码（6位随机数）
        /// </summary>
        [Required(ErrorMessage = "原密码不能为空")]
        [StringLength(32, ErrorMessage = "原密码长度不能超过32个字符")]
        public string OrgPassword { get; set; } = string.Empty;

        /// <summary>
        /// 验证码
        /// </summary>
        [StringLength(50, ErrorMessage = "验证码长度不能超过50个字符")]
        public string? VerifyCode { get; set; }

        /// <summary>
        /// 二维码
        /// </summary>
        [StringLength(500, ErrorMessage = "二维码长度不能超过500个字符")]
        public string? QrCode { get; set; }

        /// <summary>
        /// 退费余额
        /// </summary>
        public decimal? RefundBalance { get; set; }

        /// <summary>
        /// 用户ID
        /// </summary>
        [StringLength(50, ErrorMessage = "用户ID长度不能超过50个字符")]
        public string? UserId { get; set; }

        /// <summary>
        /// 用户名
        /// </summary>
        [StringLength(100, ErrorMessage = "用户名长度不能超过100个字符")]
        public string? UserName { get; set; }

        /// <summary>
        /// 患者姓名
        /// </summary>
        [StringLength(100, ErrorMessage = "患者姓名长度不能超过100个字符")]
        public string? PatName { get; set; }

        /// <summary>
        /// 身份证号
        /// </summary>
        [StringLength(20, ErrorMessage = "身份证号长度不能超过20个字符")]
        public string? IdNumber { get; set; }
    }

    /// <summary>
    /// 等待HIS退费响应模型
    /// </summary>
    public class WaitForHisRefundResponse
    {
        /// <summary>
        /// 是否成功
        /// </summary>
        public bool Success { get; set; }

        /// <summary>
        /// 消息
        /// </summary>
        public string Message { get; set; } = string.Empty;

        /// <summary>
        /// 患者ID
        /// </summary>
        public string? PatientId { get; set; }

        /// <summary>
        /// HIS数据库更新时间
        /// </summary>
        public DateTime? HisUpdateTime { get; set; }

        /// <summary>
        /// 验证码信息ID
        /// </summary>
        public int? VerifyInfoId { get; set; }

        /// <summary>
        /// 操作详情
        /// </summary>
        public string? Details { get; set; }
    }
}